package command

import (
	"fmt"
	"probe/asset"

	"github.com/spf13/cobra"
)

var (
	VersionCmd = &cobra.Command{
		Use:   "version",
		Short: "version",
		Long:  `version.`,
		Run: func(cmd *cobra.Command, args []string) {
			ShowVersion(args)
		},
	}
	VERSION = "1.0.0"
	BANNER  = `
██████╗ ██████╗  ██████╗ ██████╗ ███████╗██████╗ 
██╔══██╗██╔══██╗██╔═══██╗██╔══██╗██╔════╝██╔══██╗
██████╔╝██████╔╝██║   ██║██████╔╝█████╗  ██████╔╝
██╔═══╝ ██╔══██╗██║   ██║██╔══██╗██╔══╝  ██╔══██╗
██║     ██║  ██║╚██████╔╝██████╔╝███████╗██║  ██║
╚═╝     ╚═╝  ╚═╝ ╚═════╝ ╚═════╝ ╚══════╝╚═╝  ╚═╝`
)

func ShowVersion(args []string) {

	banner := fmt.Sprintf(`%s

Version: %s
BUILD:   %s
`, BANNER, VERSION, asset.BUILD_DATE)
	fmt.Println(banner)
}
